#!/usr/bin/perl -w 

use Data::Dumper;
use Audio::M4P::QuickTime;


$md_num = $#ARGV;
for (my $count = 1; $count <= $md_num; $count++){

        $ARGV[$count] =~ /^([\w+]+):(.*)/;
        $metadata{$1} = $2;
}

my $qtime = new Audio::M4P::QuickTime(file => $ARGV[0]);


foreach my $key (keys %metadata){

	$qtime->SetMetaInfo(uc($key) => $metadata{$key});
}


$qtime->WriteFile($ARGV[0]);
